package com.aaa.outbound.mapper;
import com.aaa.entity.outbound.Picktask;
import com.aaa.entity.outbound.ViewPicktask;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author wjf
 * @since 2020-11-26
 */
@Mapper
@Component
public interface PicktaskMapper extends BaseMapper<Picktask> {
    @Select("select id,picktaskno from o_picktask")
    public List<Picktask> selectPicktasknoByPicktask();
    @Select("select pd.commoditybar,pd.commodityname,pd.locatorcode,pd.locatorname,pd.qty,po.outorderno from o_picktask_detail pd \n" +
            "join o_outorder o on pd.pid=o.id \n" +
            "join o_picktask_outorder po on o.id=po.outorderid\n" +
            "join o_picktask p on p.id=po.picktaskid\n" +
            "where p.picktaskno=#{picktaskno}")
    List<ViewPicktask> selectViewPicktaskByPicktaskno(String picktaskno);
}
